<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'login.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <h1>blog列表</h1>
  
  <table>
  	<thead></thead>
  	<tbody>
  		<tr> 
	  		<td>id<td>
	  		<td>标题<td>
	  		<td>内容<td>
	  		<td>操作<td>
  		
  		</tr>
  		<c:forEach items="${blogList}" var="blog" varStatus="s">
  			<td>${s.index+1}<td>
	  		<td>${blog.title}<td>
	  		<td>${blog.content}<td>
	  		<td><a href="/blog/get?id=${blog.id}"><span>修改</span></a>
	  			<a href="/blog/delete?id=${blog.id}"><span>删除</span></a>
	  		<td>
  		<tr>
  		</tr>
  		</c:forEach>
  	</tbody>
  </table>
  <hr>
  <form action="/blog/add" method="post">
   标题：<input type="text" name="blog.title" /><br>
   内容：<textarea name="blog.content" ></textarea><br>
  
   <input type="submit" value="添加"/><br>
   </form>
 
  
  </body>
</html>
